const express = require('express');
const router = express.Router();
const { login, getProfile } = require('../controllers/authController');
const { authenticate } = require('../middleware/auth');

// 公开路由
router.post('/login', login);

// 需要认证的路由
router.get('/profile', authenticate, getProfile);

module.exports = router;


